move substitute state to state object