refactor task index