stateCheck now checks green first for efficiency