compatible with python-3.3

test.py passed against python 3.3