changed print statements to make them compatible with Python 3 as well