updated template url generation