added function of getting activity data