removed the py3 warning, added support for py2 bytearray