adding ability to specify total as a function, and adding example of giving complete control of the data to the caller
Merge pull request #91 from collinsauve/master

adding ability to specify total as a function, and adding example of giv...