refactored Stat class
merged with dev (resolved conflicts)
Merge branch 'dev-stat' into dev