Added infinite scrolling to search function