Made finite_diff efficient