[CHANGE] compatibility to Py2 and Py3