working code gen.