Code formatting
Added buffer. 

Buffer modified inplace.