compare the two tree