adds Stats class; a few small addings