added Sample class; will fold functionality in to main Stats class and implement in C as well since there appears to be significant performance boost