js throttle pattern added for scrolling