wait for the DOM to load before inserting anything