added mastery prereqs logic