refactor unit