add candidateTaskIndex in the taskController