added SEO code and removed redirect function