implement statistics service