save current index