add documentation to getBuffer