better bad-result filter and some tests