grouped data by subject and activity