implement Domain
fix target tests after domain implementation