make buffering a counter instead of a boolean