refactoring dataLayer and domain