change to use xptemplate plugin