refactor the recent_tasks() view