issue #7 - implement safe-thread on stats.go