change origin and template