finished circular-buffer