added matrix and kalman methods