finally finish @template() and @upload()