working on Pattern2NDFSM building