Batch mode for readDistances function