added perimter but seems long-winded; couldn't get rectangle points to compute after if stmnts