Reuse sort and pluck functions