add hook for autogeneration code

this gives us the option of making the autogeneration much less brittle