Added some exception handling for when input contains data that can't be converted to an int.