add python2 unicode compatibility