stopped dupe keys when assigning new value to existing key