added python3 support