added python2 compability