implement some member functions of rectangle class