Added python3 compatible changes for example