Update state.cpp