working on hex generation in jscript