Added buffer for painting