start to implement tree-compression