random numbers for distances