crude first cut working. needs a ring buffer.