testing different values of threshold and changed speed to slow