changing char array to int. adding case to check_input()