On p. 87 there is a diagram showing what totalAssetValues() does.
Just posting mine for inspiration (adapted from one I did some time ago)