put overwrites value of given key when trying to duplicate key