move things out of window.onload