moving scripts to the top of the page