better way to store matches
preventing conditions are checked when matching against unordered children