added template for pagination