skeleton of index exchanging