Implemented Rect class