Added back xptemplate