updating physics engine