refactor modifier parsing