move javascript out of HTML