partial refactor of check to has_matches

also fixing previous refactor of size