created new loader function, and updated scroll to results function