added python3 compability