remaking jscript simplifying
clean JS