add grads struct