Add state machine for guards