update example to use DynamicTemplate