the struct was ugly, making buffer class instead