finish extrac_min, test and guard boundary condition for @root_head and @min