fix the reduce logic, add basic modifier parsing