eliminate unnecessary variable in raster mode