add the weight_line, weight_Vertex functions