Pass the stats functions by value and not by reference