1. add refinePath function to merge adjacent nodes which have some
cell_id