add calculateDimensions method