add master unique hacking weighted-average function
add master unique hacking weighted-average function