the controller now updates the state of the trap and the particle