switched to using domcontentloaded