cleaned up indexing
added 2 new test cases