unfortunate implementation of length(v,w)
sap works? but slow