argh got fed up trying to shoe-horn into sim.py