use a single ring buffer instead of two