Added sorting to the task table