refactored domain