modify buffer