tweaks to generate_*