added the document.ready function