States can now change to a new state at the end of a run