How to handle generated code