add write buffer