added double buffering and toolbar