Added callback to return index value