python 3 support; fixes #1