diff --git a/python_arborist.py b/python_arborist.py
index db3f3690d7d18299e6d92139e0e559447f2aad03..c7ed80df4c131aebeaaa8580f1f392551d228fbf 100644
--- a/python_arborist.py
+++ b/python_arborist.py
@@ -431,9 +431,9 @@ def deserializer(serialized_array, last_idx_written):
 
 
 
-the_tree = deserializer(serialized_tree_final, 30)
+parser_output_tree = deserializer(serialized_tree_final, 30)
 
-walk_the_tree(the_tree,0)
+walk_the_tree(parser_output_tree,0)
 
 #print("derivation tree was")
 #walk_the_tree(bgen[1])
@@ -442,4 +442,17 @@ print("reversed derivation tree is")
 z.reversiflip(bgen[1])
 walk_the_tree(bgen[1])
 
-print("THE ORIGINAL WAS", [hex_to_name(x) for x in parse_me])
+print("THE ORIGINAL STRING WAS", [hex_to_name(x) for x in parse_me])
+
+
+def are_trees_equal(tree_one_root, tree_two_root): # returns True if equal, False otherwise
+    if (tree_one_root.language_element != tree_two_root.language_element):
+        return False
+    if (len(tree_one_root.subnodes)    != len(tree_two_root.subnodes)):
+        return False
+    if ((len(tree_one_root.subnodes) == 0) and (len(tree_two_root.subnodes) == 0) and (tree_one_root.language_element == tree_two_root.language_element)):
+        return True
+    for idx, elem in enumerate(tree_one_root.subnodes):
+        return are_trees_equal(elem, tree_two_root.subnodes[idx])
+
+print("ARE TREES EQUAL???", are_trees_equal(bgen[1], parser_output_tree))
\ No newline at end of file