finish return values for the legacy api, add sim.saveStamp and sim.loadStamp