improved test_diff