added courseMastered function