Use gradient API more often.