working version of euler-cromer