reduced writes to single use, and implemented an output buffer