Indexing i and j is done.