refactor domains