Update simulate.py

Untested, work in progress