Refactoring Rectangle