added infinite scrolling, refactored paging