added double buffer for smooth scroll