got cyclic buffer working