update data struct