sparse gradients working