small domain refactor