make it compatible with Python 3