cleans up index