first getDistance; some tests ok; todo : minimize way