added second order euler method