improved python 2 and 3 compatibility
Merge remote-tracking branch 'origin/master'