Working version with test function and first method of differentiation. TODO: add 2nd differentiation method
TODO: loop over different h-s