Added ability to get current index