Implementation of stats service