adding sum of distances method (that doesn't really work)