pick the trace that has the closest length