delay calling things until the document is ready