Updated sort_example to use the new template