fixed the function we were working on

it was not working previously for t > 1. IT should be now, but because
it is an iterative process (only one column/row is added each iteration,
I could not thoroughly test it yet. But at least it looks better than
before.

Also note matrix multiplication is done by np.dot()