added simulation with second derivative