general adjustments for python3