added python 3 support, fixes #5