corrected the wrong covariance matrix. The variance for x was at pos[1],
not at pos[0]