Added an extension method to return tasks in order of their completion.