modified to include validateInt method to validate against the array of
possible integers