included a frame buffer to update flicker