Added some lines to extract two subregions rather than one.