tweak rasterize method