setRegions function added