Made dt a parameter, default=1, real dt used is 0.01*dt