Added generic index method that paginates