update code from NukeViet 04052014