updates to work with latest sim.js