added python 3 support