fixed the program to handle non-int answers