working on applying the gradient cutoff