r/w working for maps and structs