make it work with python2 too