added infinite scrolling and pagination