update sampleall to have new template api