update code from NukeViet