add length calculation to nodes.