Learning routines: two cases