added unit tests in stats sub-package