see helper suggestion for getting current index.