modified if in case of bad distance read