added Stats class and methods related statistics moved to it