updated current index