added header passing for codegen