extracted html to templates