add generator, unit test, and implementation