error with input checking