return the most shallow match