approximating the derivative