changed algorithm for todays activity