change onclick event to onload event