fixed a bug ( add a new node )

user must input the weight.