refactored SampleStatGeneric into a static class