Added rgb to grayscale and normalization