Adding distance/complexity API