add function to show the selected template