oh wait won't this break horribly if the buffer is too small

uhhh