Added function to update data values