matching working better as it sorts first now