updated example with motion.