updated domain function