extract UserInputHandler into separate file