filter out bad docs