fixing up index