working on optimization, ring buffer shrink, and getting stuff to work hopefully