switched to document.ready