implement packet statistics