fixed encoding so it works with python 3