one thread, use os buffer
buffering
improvements
move stuff around