refactoring into gem and user input components