doesn't it eventually need to free the buffer here?