making the endless scroll work