build structured routines