fix python 3 syntax
make script compatible with python3