just before index & index2 swap