issue #7 - refactored stats.go