added get activities function