loop through and calculate size