sort by on index of tasks