added DISTINCT for corpus fetching for faster filtering