sort all beacons ordered as closest
clean up