minimalizing Mealy Moore
bugfix
expand