Added a calculate size method