small refactoring of user stats