reinstated indexData function, made test