update datastruct