reformatting and added revert all buffers