recursive Function to get subregions