How to build a core routine