Shake to toggle running the algorithm