extracting subnets