made python3 compatible