added critical state