Add an update method to dict