add update, use double buffer to eliminate the flicker phenomenon