testing javascript timeout/throttle