Modified shon to be managed by a Finite State Machine