added error message if input is non-numeric