finite state machine construction 5920283