Added a test to index and print frequencies