javascript now running on page load