Added the method to update the data.