refactored listeners