Updated single loop template