implemented save offscreen buffer