add hash function
implement tree_compression