improve condition structure for getActivities