changed the dictionary update method