moved orginal reduce-kv above additions