converted to library
New stat class added