switching to onload event and increasing timeout