came up with a way to check for correct input values