changed to document.ready