STATE machine modified