Unicode python3

fix to work on both python2 and python3, checked in #40