count length rather than chunks in buffering
newApi -> ez renaming