some small refactoring for the statistics