made timestep dynamic, fixed coupla bugs