add size calculation