Finished new distance speedup