added newIndex