worked out totalsize for log