rework motif routines