started working on user input, refactored