fix syntax error for python 3.x