refactor domain model