update template, now pagination works