Assign rather than compute twice

Assigning new size is more straightforward code rather than computing
new size multiple locations. Because the code wants to update size.
Merge pull request #10 from kou/assign-rather-than-compute-twice

Assign rather than compute twice