finite state machines usage 5549877