code generation prototype