updated P6 with Codegen.p