added getNumberOfRegions functions