Added generateDistance methods.