region.c modified