some py3 compatibility