dx: some mods to model.py