add a state at the end