fix 'too much recursion' error & add a speed slider