add function to accumulate descriptive statistcs.
rethinking basic statistics - generalize a bit.