python2/3 workaround