added possibility for custom domain constraints in wrap_constraints
documenting