wrote splice method to ensure that only 20 items are passed to page