add an average function (in reference to github issue #2) and a type traits class; neither have been tested yet