added kalman filtering