wire up pagination