even more porting
port to python3