edited code generation, respective API