removed use of bytearray for python 2.5 compatability