handles bad input better in the application