a simple stats library and commandline utility