added functionality to binarybuffer