buffer class complete