combine setRegion1 and 2 into one getRegion function