move domReady section to the end of the JS