added Kalman smoothing