*sz4: some small bits

mostly changes to 'wieghted sum' calculation