Typed finite state machine!