added onload event logic