Made the script Python 3 combatible