Improved tiles to gray scale example