added tests for index coding and flag coding