update code from NukeViet 14042014