Added to client-server API: store distance.