stopListening refactor