changed naming: byUser -> userToUser
fixed bug: return 0 if totalWeight=0 in weightedMean