moved class CircularBuffer into static library