Keep it compatible with py2 and py3