refactor of domain