modify buffer to make it more like evbuffer