add logic to create a new state after executing a transition