This is the update that correctly implements the modified euler method correctly.