made compatible for python3