Fixed syntax of simulator for Py3