get rid of std::map in state.cpp