enhancements to gen_data.py