add gc for buffer