Add index to task