Update motion.cpp