buffer implement