Updated stats library

to work with Teensy