improved the accelerometer to detect shake better