changed print commands for python3 compatibility