added setSpeed code, need to test