add template file for custom loop