Modified getStudentData and main functions for portability