domain related stuff refactored