Compatible with Python 3.2/2.7