check the state