work code generation