updated "ready" method

now attaching to window.onload as well as document.readystatechange