Better logic for extra perimeters