removed unecessary code from indexing