vectorize the gradient calculation and remove the other testcase again,
because the problem wasn't a bug.