some python3 compatibility