implemented basic 3D motion