added check_state to Judge