refactored input_students and seperated methods