rework the stat callback