change some code, add a new function to fp_tree