add simple motion detection fn