Moved the method of update.