added error messages for non-numeric input; loops prompting for input