replace and sort methods into Domain