Updated activity retrival logic