motion detection is worked