refactor - move implementation to method
rectangle method has been implemented