changing to run at document-start