Add failure handling for getState
Merge branch 'master' of github.com:chw2006/cs425-mp2