V1.13
much effort to run both on python2 and python3