changed templates to sample from material
updated templates to use new sample code