Motor skill acquisition during a balance task as a process of optimization of motor primitives