mashine can now have states as strings
default endstate is now "end"