Added as_buffer