modified recent activities select logic