make python3 compatible