for the table questions, validating input