making the qsort deterministic for BooleanEdge