Moved weight method into edge.