made python 3 friendly