domain refactor