refactor, can use pagination anywhere. add to issues