added function stat tracking and reporting