Refactored setting up params for the matching to it's own function