fixed loading of lengths
added modelling of link lengths
fixed loading of lengths