trying to make more python 3 compatible.