updated to return match results