add discretization function and kalman filter