Using movement primitives in interpreting and decomposing complex trajectories in learning-by-doing