add index to tasks