updated logic for removed index now not overrides any values