removed dependence on MotionEvent history as it is unreliable