(#1932) Implement pagination