refined a bit the pattern for matching tree nodes