adding updatePixels method