rework specific python2 to 3 function issues - issue #179