Updated the updateData routine.