break added when detection of motion