updated with maskOutOfRegions function