debugging of test_stats--all but one minor test failure dealt with