add buffer module and ring buffer