Made examples Python 3 compatible