simple working FSM /w unit tests I wrote on a whim, I think it might be useful for this idea I have