fix calculateDimensions function
Merge pull request #5 from warawara/master

fix calculateDimensions function