indexing code done