-Added double buffering