small refactoring for InputListener