added basic user input handling