moved util class, added ringbuffer and optimized imports