simplifying gradient