index is also changed