Implemented the grayscale filter