buffer class