made it python2 compatible