try adding global state flag