lazy initialization for total size