moved everything to templates