add generic buffer class