put templates in order