fixed the table so now it doesn't add invalid input