Perimeter function works.