Added tracking of indexing for testing