working list-replacement in map