trying to fix syntax errors in python 3.2