method perimeter of rectangle defined