changed function removed window.onload