Added total size calculation.