updated for pagination and uncommented demo