Added a flag to include the distance in the return data. I did this to cut down on memory