added grayscale/color mode