rewrites from using cznic/kv to map