implemented calcHeadSize for Buffers