Made match O(1), was O(n).