added examples for using templates