another attempt at index task