switching to index