make the max time scale variable