look at the state type when setting class flags