adding window.onload event