Working code to return 8 distances and below