toolbox-friendly code generation