make BuilderEventHandler a state machine