code generation slightly improved