So if you don't have any match you're happy to just return the first option. In which case why not look for an exact match and if there is no exact match then return the first option. As I said before it looks to be an over engineered solution.