updated code to take into acct the course reqs