added speed control and tweaked image processing