begin to optimzie the grad(b(y),y) method.