fix for read buffer overflow bug
adds read & write test
remove stats helper methods and combine them into one method
2.0.0