Added storage for greyscale value so output would be correct