Add distance API