seems find out the bugs in the new datapath extraction algorithm but loops are found in remove_useless_nodes