Composition of motions