refactor do task e index