level states and flags