changing second deriv calculation in initial conditions