Refactored so that database wasn't being called everytime a match was selected.