added method chains for setting template.