Remove const from *match. Add for loop for tree.