Sort all tasks