This work in update() moved to simulate() which is called at the end of update().