handled user input better