make Python 3 compatible