improve test_reduce.php