domain restriction and tests