make python 3 compatible