edge length depends on weight