add unit test for histogram indexing