handle input better