fixing somewhat major bug in regex: check if a course was already added when iterating over fields