find out the relationship between index and new position