workaround of code generation