changed variable name in initByteStreamWithSize
added function documentation