refactoring Shape