make the code run in python2 and 3 at the same time