improved shortest path algorithm

adaptions to gml parser as well