set default weight value to 0.