moved garbage collection stats function