abstracted stats_mngr so it can be used as stand alone library