added codegen for print