checking the perimeter