optimization to moving background gradients