refactor affix handling