merge add infinite scroll codes to a single fcn
delete redundant code regarding infinite scroll
implement category functionality