added derivative approximation testing