python 3 compatiablity added