change replace to put for maps