recent acitvites logic is updated