add generation to chunkparser, with unit tests, and improve unit test structure