moved javascript out of html