add som/test and som/test/test_stat.rb
refactoring at som/lib/som/stat_helpers.rb