corrected image and defDomain functions