replacing a muatation with a map