pattern and affix generation updated