compare trees