ord and eq for tree data type