implemented uniform edge length energyfunction