Refactor the match role function out to the top