added dithering and looping command line options