refactor subtract