add throttle to delay the function call for 2 sec
reduce the calculation
increase the speed since throttle the call loop
fix an isuee when newPosition.x == 0
remove the keypress event