Edited to combine clock and Speedfactor