fixed gray()