added tests for statistics function