moved time tracking out to main from rk4 so that it can be handled seperately