my cool code
no longer making a system call for every byte written