use dt instead of maxTimestep