Trying to reintroduce the stats handler