add weight calculations
Merge pull request #1 from wildstone/master

add weight calculations