use a sorted map
use reduce-kv