Make it compatible with python 3