more input error checking