use a vector for a ring buffer