motion detection class added