add wrapper routine for python2