remove re-indexing code