apparently the map is the best way to do it, so won't be using keyreplace