Make python 3 compatible