update code from NukeViet 15042014