add motion detection