extracted class UserInputListener