adapted to changes in indices