unspent, impl 2: sort output.