now checks whether regions are valid.