Simplyfiung the code
onload event handler added