updated to keep fractional weights
small edits & typo fixes
Merge pull request #3 from dataknut/master

updated to keep fractional weights