customer refactor