First part for Python 2 compatibility