Bytearray instead of string for Python3 compatibility