added casting operator to Rect