add function support for greyscaling