changed "reset" logic to "stop" logic