use the derivative!