Add buffer functionality.