changing the get courses from file method