tweaks for py3