half way to checking for invalid input