reorganize template