Refactor SUB