preparations for codegen