needs an explicit ordering, otherwise return value is non-deterministic.