loop to go though all the courses