add update according to Pengfei's code