ENH: updated for python3