Adding option to use variable timestep