checkpoint rework to get code generation working