factored ns ws out of page load