Modified midterm, still having trouble with handling bad user input