add indexes for each todo when displaying