added activity, subjectid, and average definitions