Added double buffer