adding rule for motion detection