tweak .reshape((T,)) to .ravel()