better python3 compatibility